\(\int (d x)^m \sqrt {c x^2} (a+b x) \, dx\) [971]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 59 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {a (d x)^{2+m} \sqrt {c x^2}}{d^2 (2+m) x}+\frac {b (d x)^{3+m} \sqrt {c x^2}}{d^3 (3+m) x} \]

[Out]

a*(d*x)^(2+m)*(c*x^2)^(1/2)/d^2/(2+m)/x+b*(d*x)^(3+m)*(c*x^2)^(1/2)/d^3/(3+m)/x

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {15, 16, 45} \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {a \sqrt {c x^2} (d x)^{m+2}}{d^2 (m+2) x}+\frac {b \sqrt {c x^2} (d x)^{m+3}}{d^3 (m+3) x} \]

[In]

Int[(d*x)^m*Sqrt[c*x^2]*(a + b*x),x]

[Out]

(a*(d*x)^(2 + m)*Sqrt[c*x^2])/(d^2*(2 + m)*x) + (b*(d*x)^(3 + m)*Sqrt[c*x^2])/(d^3*(3 + m)*x)

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[a^IntPart[m]*((a*x^n)^FracPart[m]/x^(n*FracPart[m])), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {c x^2} \int x (d x)^m (a+b x) \, dx}{x} \\ & = \frac {\sqrt {c x^2} \int (d x)^{1+m} (a+b x) \, dx}{d x} \\ & = \frac {\sqrt {c x^2} \int \left (a (d x)^{1+m}+\frac {b (d x)^{2+m}}{d}\right ) \, dx}{d x} \\ & = \frac {a (d x)^{2+m} \sqrt {c x^2}}{d^2 (2+m) x}+\frac {b (d x)^{3+m} \sqrt {c x^2}}{d^3 (3+m) x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.64 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {x (d x)^m \sqrt {c x^2} (a (3+m)+b (2+m) x)}{(2+m) (3+m)} \]

[In]

Integrate[(d*x)^m*Sqrt[c*x^2]*(a + b*x),x]

[Out]

(x*(d*x)^m*Sqrt[c*x^2]*(a*(3 + m) + b*(2 + m)*x))/((2 + m)*(3 + m))

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.68

method result size
gosper \(\frac {x \left (b m x +a m +2 b x +3 a \right ) \left (d x \right )^{m} \sqrt {c \,x^{2}}}{\left (3+m \right ) \left (2+m \right )}\) \(40\)
risch \(\frac {x \left (b m x +a m +2 b x +3 a \right ) \left (d x \right )^{m} \sqrt {c \,x^{2}}}{\left (3+m \right ) \left (2+m \right )}\) \(40\)

[In]

int((d*x)^m*(c*x^2)^(1/2)*(b*x+a),x,method=_RETURNVERBOSE)

[Out]

x*(b*m*x+a*m+2*b*x+3*a)*(d*x)^m*(c*x^2)^(1/2)/(3+m)/(2+m)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.75 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {{\left ({\left (b m + 2 \, b\right )} x^{2} + {\left (a m + 3 \, a\right )} x\right )} \sqrt {c x^{2}} \left (d x\right )^{m}}{m^{2} + 5 \, m + 6} \]

[In]

integrate((d*x)^m*(c*x^2)^(1/2)*(b*x+a),x, algorithm="fricas")

[Out]

((b*m + 2*b)*x^2 + (a*m + 3*a)*x)*sqrt(c*x^2)*(d*x)^m/(m^2 + 5*m + 6)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (49) = 98\).

Time = 1.69 (sec) , antiderivative size = 173, normalized size of antiderivative = 2.93 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\begin {cases} \frac {- \frac {a \sqrt {c x^{2}}}{x^{2}} + \frac {b \sqrt {c x^{2}} \log {\left (x \right )}}{x}}{d^{3}} & \text {for}\: m = -3 \\\frac {\frac {a \sqrt {c x^{2}} \log {\left (x \right )}}{x} + b \sqrt {c x^{2}}}{d^{2}} & \text {for}\: m = -2 \\\frac {a m x \sqrt {c x^{2}} \left (d x\right )^{m}}{m^{2} + 5 m + 6} + \frac {3 a x \sqrt {c x^{2}} \left (d x\right )^{m}}{m^{2} + 5 m + 6} + \frac {b m x^{2} \sqrt {c x^{2}} \left (d x\right )^{m}}{m^{2} + 5 m + 6} + \frac {2 b x^{2} \sqrt {c x^{2}} \left (d x\right )^{m}}{m^{2} + 5 m + 6} & \text {otherwise} \end {cases} \]

[In]

integrate((d*x)**m*(c*x**2)**(1/2)*(b*x+a),x)

[Out]

Piecewise(((-a*sqrt(c*x**2)/x**2 + b*sqrt(c*x**2)*log(x)/x)/d**3, Eq(m, -3)), ((a*sqrt(c*x**2)*log(x)/x + b*sq
rt(c*x**2))/d**2, Eq(m, -2)), (a*m*x*sqrt(c*x**2)*(d*x)**m/(m**2 + 5*m + 6) + 3*a*x*sqrt(c*x**2)*(d*x)**m/(m**
2 + 5*m + 6) + b*m*x**2*sqrt(c*x**2)*(d*x)**m/(m**2 + 5*m + 6) + 2*b*x**2*sqrt(c*x**2)*(d*x)**m/(m**2 + 5*m +
6), True))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.66 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {b \sqrt {c} d^{m} x^{3} x^{m}}{m + 3} + \frac {a \sqrt {c} d^{m} x^{2} x^{m}}{m + 2} \]

[In]

integrate((d*x)^m*(c*x^2)^(1/2)*(b*x+a),x, algorithm="maxima")

[Out]

b*sqrt(c)*d^m*x^3*x^m/(m + 3) + a*sqrt(c)*d^m*x^2*x^m/(m + 2)

Giac [F(-2)]

Exception generated. \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((d*x)^m*(c*x^2)^(1/2)*(b*x+a),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Limit: Max order reached or unable to make series expansion Error: Bad Argument Value

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.66 \[ \int (d x)^m \sqrt {c x^2} (a+b x) \, dx=\frac {x\,{\left (d\,x\right )}^m\,\sqrt {c\,x^2}\,\left (3\,a+a\,m+2\,b\,x+b\,m\,x\right )}{m^2+5\,m+6} \]

[In]

int((d*x)^m*(c*x^2)^(1/2)*(a + b*x),x)

[Out]

(x*(d*x)^m*(c*x^2)^(1/2)*(3*a + a*m + 2*b*x + b*m*x))/(5*m + m^2 + 6)